/**
 * Created with Vim7.3 ubuntu12.04
 * @fileOverview : 
 * @author : Lyle csq-3@163.com
 * @since : 2015-05-20 23:22:56
 * @filename : src/controllers/reg.js
 * @version : 
 * @description : 
 */

define(function(require, exports, module) {
   
    var RegView, 
        mId = 'reg', 
        reRender = false,
        reload = false,
        tpl = require('{view}/reg.tpl');

        RegView = Backbone.View.extend({

        el: 'body',

        template: _.template(tpl),

        bindEvt : function() {
            var tthis = this;
            $('#'+mId).find('.index').on('click',function() {
                //Backbone.appRouter.navigate('index', { trigger: true });
                var obj = {
                     type : 'slide',
                     direction: 'right'
                };
                var str = JSON.stringify(obj);
                Backbone.appRouter.navigate('index/'+str, { trigger: true });
            });
        },      

        render: function (obj) {

            $Share.permission(true); 
            $Share.reload(reload,mId);
            $Share.reRender(reRender,mId);

            if ($('#'+mId).length < 1) { 
                $('#moduleBox').append(this.template($Lang)); 
                this.bindEvt(); 
            }
        }

    });

    module.exports = RegView;
});


